home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 …SCII & the Runetime Code / ADC Developer CD (1992-07) (''Butch ASCII And The Runtime Code'')_iso / Dev.CD 199207.iso / Tools & Apps / OS⁄Toolbox / QuickDraw / RlePict / include / QDOffscreen.h next >
Encoding:
C/C++ Source or Header  |  1991-03-08  |  2.9 KB  |  92 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3. Created: Tuesday, May 9, 1989 at 5:26 PM
  4.     QDOffscreen.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.     Copyright Apple Computer, Inc.  1985-1989
  9.     All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __QDOFFSCREEN__
  15. #define __QDOFFSCREEN__
  16.  
  17. #ifndef __QUICKDRAW__
  18. #include <Quickdraw.h>
  19. #include <Color.h>
  20. #endif
  21.  
  22.  
  23. /* New error codes */
  24.  
  25. #define cDepthErr -157  /*invalid pixel depth*/
  26.  
  27. enum {pixPurgeBit = 0,noNewDeviceBit = 1,pixelsPurgeableBit = 6,pixelsLockedBit = 7,
  28.     mapPixBit = 16,newDepthBit = 17,alignPixBit = 18,newRowBytesBit = 19,reallocPixBit = 20,
  29.     clipPixBit = 28,stretchPixBit = 29,ditherPixBit = 30,gwFlagErrBit = 31};
  30.  
  31. enum {pixPurge = 1 << pixPurgeBit,noNewDevice = 1 << noNewDeviceBit,pixelsPurgeable = 1 << pixelsPurgeableBit,
  32.     pixelsLocked = 1 << pixelsLockedBit,mapPix = 1 << mapPixBit,newDepth = 1 << newDepthBit,
  33.     alignPix = 1 << alignPixBit,newRowBytes = 1 << newRowBytesBit,reallocPix = 1 << reallocPixBit,
  34.     clipPix = 1 << clipPixBit,stretchPix = 1 << stretchPixBit,ditherPix = 1 << ditherPixBit,
  35.     gwFlagErr = 1 << gwFlagErrBit};
  36. typedef unsigned long GWorldFlags;
  37.  
  38.  
  39. /* Type definition of a GWorldPtr */
  40.  
  41. typedef CGrafPtr GWorldPtr;
  42.  
  43. #ifdef __safe_link
  44. extern "C" {
  45. #endif
  46. pascal QDErr NewGWorld(GWorldPtr *offscreenGWorld,short PixelDepth,Rect *boundsRect,
  47.     CTabHandle cTable,GDHandle aGDevice,GWorldFlags flags)
  48.     = {0x7000,0xAB1D}; 
  49. pascal Boolean LockPixels(PixMapHandle pm)
  50.     = {0x7001,0xAB1D}; 
  51. pascal void UnlockPixels(PixMapHandle pm)
  52.     = {0x7002,0xAB1D}; 
  53. pascal GWorldFlags UpdateGWorld(GWorldPtr *offscreenGWorld,short pixelDepth,
  54.     Rect *boundsRect,CTabHandle cTable,GDHandle aGDevice,GWorldFlags flags)
  55.     = {0x7003,0xAB1D}; 
  56. pascal void DisposeGWorld(GWorldPtr offscreenGWorld)
  57.     = {0x7004,0xAB1D}; 
  58. pascal void GetGWorld(CGrafPtr *port,GDHandle *gdh)
  59.     = {0x7005,0xAB1D}; 
  60. pascal void SetGWorld(CGrafPtr port,GDHandle gdh)
  61.     = {0x7006,0xAB1D}; 
  62. pascal void CTabChanged(CTabHandle ctab)
  63.     = {0x7007,0xAB1D}; 
  64. pascal void PixPatChanged(PixPatHandle ppat)
  65.     = {0x7008,0xAB1D}; 
  66. pascal void PortChanged(GrafPtr port)
  67.     = {0x7009,0xAB1D}; 
  68. pascal void GDeviceChanged(GDHandle gdh)
  69.     = {0x700A,0xAB1D}; 
  70. pascal void AllowPurgePixels(PixMapHandle pm)
  71.     = {0x700B,0xAB1D}; 
  72. pascal void NoPurgePixels(PixMapHandle pm)
  73.     = {0x700C,0xAB1D}; 
  74. pascal GWorldFlags GetPixelsState(PixMapHandle pm)
  75.     = {0x700D,0xAB1D}; 
  76. pascal void SetPixelsState(PixMapHandle pm,GWorldFlags state)
  77.     = {0x700E,0xAB1D}; 
  78. pascal Ptr GetPixBaseAddr(PixMapHandle pm)
  79.     = {0x700F,0xAB1D}; 
  80. pascal QDErr NewScreenBuffer(Rect *globalRect,Boolean purgeable,GDHandle *gdh,
  81.     PixMapHandle *offscreenPixMap)
  82.     = {0x7010,0xAB1D}; 
  83. pascal void DisposeScreenBuffer(PixMapHandle offscreenPixMap)
  84.     = {0x7011,0xAB1D}; 
  85. pascal GDHandle GetGWorldDevice(GWorldPtr offscreenGWorld)
  86.     = {0x7012,0xAB1D}; 
  87. #ifdef __safe_link
  88. }
  89. #endif
  90.  
  91. #endif
  92.